package com.u.toolbox;

import java.lang.reflect.Constructor;

import com.u.tool.*;

public class ToolBox extends AbstractToolBox {

	@Override
	public MysqlUtil creatMysqlUtil(Class<MysqlUtil> clazz) throws Exception {
		Constructor constructor = clazz.getConstructor();
		return (MysqlUtil) constructor.newInstance();
	}

	@Override
	public IdentityUtil createIdentityUtil(Class<IdentityUtil> clazz) throws Exception {
		Constructor constructor = clazz.getConstructor();
		return (IdentityUtil) constructor.newInstance();
	}

	@Override
	public EventListUtil createEventListUtil(Class<EventListUtil> clazz) throws Exception {
		Constructor constructor = clazz.getConstructor();
		return (EventListUtil) constructor.newInstance();
	}

	@Override
	public UserUtil createUserUtil(Class<UserUtil> clazz) throws Exception {
		Constructor constructor = clazz.getConstructor();
		return (UserUtil) constructor.newInstance();
	}

}
